import React, { Component } from 'react';
import {connect} from 'react-redux';
import {actions} from './_index.js';

class View extends Component {
// getElementById('id').onclick = function(){
//     console.log();
// }
    render(){
        const {onFirstFn} = this.props;
        return(
            <React.Fragment>
                
                <div className="m">
                    <h3 onClick={()=>{onFirstFn('sssss')}}>web1904</h3>

                </div>
            </React.Fragment>
        )
    }
}
const mapStateToProps = (state) =>{
    console.log(state)
    // test  刚才创建web1904 这个页面的state
    return {
        test:state.web1904Data,
        test2:state.pullloadData,
    }
}
const mapDispatchToProps = (dispatch, ownProps) => {
	return {
        onFirstFn:(text)=>dispatch(actions.getApi(text)),
	}
};

export default connect(mapStateToProps,mapDispatchToProps)(View);
